import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common';

@Injectable()
export class NewsPipe implements PipeTransform {
  transform(value: any, metadata: ArgumentMetadata) {
    console.log('我是管道', value); // 通常是 Get 或则 Post 传过来的值
    console.log(metadata.type);
    value.name = '赵四';

    return value;
  }
}
